package com.luxondata.module.masterdata.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.luxondata.module.masterdata.entry.Distributor;


public interface DistributorRepository extends JpaRepository<Distributor, Long>, JpaSpecificationExecutor<Distributor>{

	@Query("select dist from Distributor dist where dist.name like %?1%")
	List<Distributor> findByName(String name);
	
	@Query("select dist from Distributor dist where dist.number like %?1%")
	List<Distributor> findByNumber(String number);
	
	List<Distributor> findByStatus(int status);
	
	
	
}
